import java.util.*;
import java.lang.String;
public class Main {
		public static void main(String[] args) {
		Scanner sca=new Scanner(System.in);
		String s=sca.nextLine();
		char a[]=s.toCharArray();
		int sum[]=new int[3];
		for(int i=0;i<a.length;i++)
		{
			if(a[i]>='0'&&a[i]<='9')
				sum[0]++;
			else if((""+a[i]).equals(" "))
					sum[1]++;
			else
				sum[2]++;
		}		
		System.out.println("数字字符个数为："+sum[0]);
		System.out.println("空格字符个数为："+sum[1]);
		System.out.println("其他字符个数为："+sum[2]);
    }
}